package com.example.yuekao.adapter;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.example.mvp.adapter.BaseAdapter;
import com.example.mvp.adapter.BaseViewHolder;
import com.example.yuekao.R;
import com.example.yuekao.bean.Demo;

import java.util.List;

public class Adapter extends BaseAdapter<Demo.ListBean> {
    public Adapter(List<Demo.ListBean> datas, Context context, int layoutId) {
        super(datas, context, layoutId);
    }

    @Override
    protected void bindData(BaseViewHolder holder, Demo.ListBean listBean) {
        ImageView imageView = holder.getView(R.id.icon);
        Glide.with(context).load(listBean.getThumb()).into(imageView);
        TextView view = holder.getView(R.id.text);
        view.setText(listBean.getTitle());


    }
}
